<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="${pageContext.request.contextPath}/statics/bootstrap-3.3.5-dist/css/bootstrap.min.css" title="" rel="stylesheet" />
<link title="" href="${pageContext.request.contextPath}/statics/css/style.css" rel="stylesheet" type="text/css"  />
<link title="blue" href="${pageContext.request.contextPath}/statics/css/dermadefault.css" rel="stylesheet" type="text/css"/>
<link title="green" href="${pageContext.request.contextPath}/statics/css/dermagreen.css" rel="stylesheet" type="text/css" disabled="disabled"/>
<link title="orange" href="${pageContext.request.contextPath}/statics/css/dermaorange.css" rel="stylesheet" type="text/css" disabled="disabled"/>
<link href="${pageContext.request.contextPath}/statics/css/templatecss.css" rel="stylesheet" title="" type="text/css" />
<script src="${pageContext.request.contextPath}/statics/script/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/statics/script/jquery.cookie.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/statics/bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript"></script>

<!--angular ui--->
<link rel="stylesheet" title="" type="text/css" href="ui-layout-0.0.0/ui-layout.css"/>
<script src="${pageContext.request.contextPath}/statics/script/angular.min.js"></script>
<script src="ui-layout-0.0.0/ui-layout.js"></script>
</head>
<body>
<div class="row newslist" style="margin-top:20px;">
                 <div class="col-md-8">
                   <div class="panel panel-default">
                      <div class="panel-heading">
                       管理吐槽<div class="caret"></div>
                       <a href="#" class="pull-right"><span class="glyphicon glyphicon-refresh"></span></a>
                      </div> 
                     <div style="position: relative;left: 20px;">
                     	<form action="${pageContext.request.contextPath}/complaints/toguanComplaints" method="post">
                        	 <div class="form-group">
                         <span class="pull-left form-span">查找内容:</span>
                           <p><input type="text" name="context" style="width: 200px;border-radius: 5px;"   placeholder="请输入关键字" value="${context}">
                            <input type="submit" class="btn btn-mystyle btn-sm" value="搜索"/>
                            </p>
                           </div>
                           <div class="form-group">
                           </div>
                            </form>
                     </div>
                     <!-- <div class="panel-body">
                           <div class="w15 pull-left">
                             <img src="img/noavatar_middle.gif" width="25" height="25" alt="图片" class="img-circle">
                             安妮
                           </div>
                           <div class="w55 pull-left">系统需要升级</div>
                           <div class="w20 pull-left text-center">2016年8月23日</div>
                          <div class="w10 pull-left text-center"><span class="text-green-main">处理中</span></div>
                      </div>
                       -->
                       
                       
                       <!-- 循环吐槽开始 -->
                       		<c:forEach items="${page.list}" var="list">
			<div style="border-bottom: 1px solid #D0D0D0;" >
				<div style="width: 88%;position:relative; left: 40px;">
					<a href="" style="text-decoration:none;">
						<img src="${list.headimg}" class="constellation" style="border-radius: 50%;" width="50px;" height="50px;" alt="" />
					</a>
					&nbsp;
					<span style="vertical-align:text-top; font-size: 15px; "><a class="a" style="text-decoration:none;color:#319DE5; " href="">
						${list.username}
					</a>
						
					<c:if test="${list.userrole==1}">
						<span style="background-color: #FF9707;border-radius: 15px;color: #FFFFFF;">&nbsp;&nbsp;楼管&nbsp;&nbsp;</span>
					</c:if>
						<span style="font-size: 4px;float: right;right: 0px;">
						<a target="main" href="${pageContext.request.contextPath}/complaints/guandeleteComplaints?complaintsid=${list.complainid}&pageNo=${page.pageNo}" onclick="return confirm('确认要下线这条吐槽吗？')" style="text-decoration: none;"><span style="background-color: #0099CC;border-radius: 15px;color: white;">&nbsp;&nbsp;下线&nbsp;&nbsp;</span></a>
						</span>
					</span>
					<br />
						<span style="font-size: 4px;position: relative;top: -20px;left: 63px;">${list.jointime}</span>
				</div>
				<div style=" width: 90%; position:relative; left: 100px;">
					<div>${list.context }</div>
					<br />
					<div>
						<c:if test="${not empty list.contextimg}"><img class="max" width="15%" height="15%" src="${list.contextimg}" alt="" /></c:if>
						<c:if test="${empty list.contextimg}"></c:if>
					</div>
					<p align="right">
						<input type="hidden" class="dianzan" name="postid" value="" />
					</p>
					<p align="center"><a target="main" href="${pageContext.request.contextPath}/comment/queryAllComment?complaintsid=${list.complainid}" style="text-decoration: none;"><img src="${pageContext.request.contextPath}/statics/images/pinglun.jpg" style="width: 18px" height="18px" alt="" />&nbsp;&nbsp;查看评论</a></p>
				</div>
			</div>
		</c:forEach>
		<table>
		<tr>
				<td width="81.6%" >共 ${page.totalPageCount} 页|第 ${page.pageNo} 页</td>
				<td style="text-align: right;" >
				<c:if test="${page.pageNo==1 and page.pageNo<page.totalPageCount}">
					<span>首页</span>
					<span>上一页</span>
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=${page.pageNo+1}">下一页</a>
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=${page.totalPageCount}">末页</a>
				</c:if>
				<c:if test="${page.pageNo>1 and page.pageNo<page.totalPageCount}">
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=1">首页</a>
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=${page.pageNo-1}">上一页</a>
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=${page.pageNo+1}">下一页</a>
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=${page.totalPageCount}">末页</a>
				</c:if>
				<c:if test="${page.pageNo == page.totalPageCount and page.totalPageCount!=1}">
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=1">首页</a>
					<a href="${pageContext.request.contextPath}/complaints/toguanComplaints?pageNo=${page.pageNo-1}">上一页</a>
					<span>下一页</span>
					<span>末页</span>
				</c:if>
				<c:if test="${page.pageNo==1 and page.totalPageCount==1}">
					已经到底了……
				</c:if>
				</td>
			</tr>
		</table>
                       <!-- 循环吐槽结束 -->
                       
                       
                       
                        
                 
                      
                 
                      
                  
                
                 
                      
                      <div class="panel-body text-center">
                      </div>
                      
                    </div>
                 </div>
               
               </div>
  
</body>
</html>